<%@ page language="java" import="java.util.*,edu.nanyang.domain.City,edu.nanyang.domain.User" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>首页--毕业设计(胡雅)校园二手交易市场</title>
		<script type="text/javascript">
			var rootPath='<%=path%>';
			var withPhoto='';
			var noPhoto='';
		</script>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<meta http-equiv="Content-Style-Type" content="text/css" />
		<meta http-equiv="Content-Script-Type" content="text/javascript" />
		<link rel="stylesheet" type="text/css" href="css/gpfw_layout.css" media="all" />
		<link rel="stylesheet" type="text/css" href="css/gpfw_color.css" media="all">
		<link rel="stylesheet" type="text/css" href="css/gpfw_font-size_medium.css" media="all" />
		<link rel="stylesheet" type="text/css" href="css/gpfw_print.css"		media="print" />
		<script type="text/javascript" src="gpfw.js"></script>
		<script type="text/javascript" src="js/jquery-1.4.4.js"	charset="utf-8"></script>
		<script type="text/javascript" src="js/main.js"	charset="utf-8"></script>
		<script type="text/javascript" src="js/My97DatePicker/WdatePicker.js"			charset="utf-8"></script>
		<style type="text/css">
			.huya1{ font-family:Arial,Tahoma,"宋体";
					font-size:15px;
					font-weight:400;
					font-style:normal;
					color:#585858
					}
		</style>

	</head>

	<body>
		<table class="azmainFrame" cellspacing="0" cellpadding="0">
			<tr>
				<td class="azgyom">
					<table class="aztileLarge" cellspacing="0" cellpadding="0">
						<tr>
							<td>
								<table class="aztileLarge" cellspacing="0" cellpadding="0">
									<tr>
										<td>
											<table class="azblt" cellpadding="0" cellspacing="0">
												<tr>
													<td valign="top" style="height: 1px">
														<table class="azblt" cellpadding="0" cellspacing="0">
															
															<tr>
																<td valign="top">
																	<table class="azbox" id="" cellspacing="0"
																		cellpadding="0">
																		<tr>
																			<td class="aznoneSheet">
																				<table class="aznaviTitleArea" cellspacing="0"
																					cellpadding="0">
																					<tr>
																						<td class="aznaviNumber" style="font-size:30px;" >校&nbsp;园&nbsp;二&nbsp;手&nbsp;交&nbsp;易&nbsp;市&nbsp;场</td>

																					</tr>
																				</table>
																			</td>
																		</tr>
																		<tr>
																			<td class="azTopalign">
																				<table class="azgrid" cellspacing="0"
																					cellpadding="0">
																					<caption style="padding: 10px 0px;">	
																					
																					当前城市:
																					<span style="font-family: Arial,Tahoma,'宋体';font-weight:700;color:#FF0000;">
																						<%if(session.getAttribute("city")==null){
																							out.print("南阳");
																						}else{
																							out.print(((City)session.getAttribute("city")).getName());
																						}%>
																					</span>
																					&nbsp;&nbsp;
																					[<a href="change_city.jsp">切换城市</a>]
																					&nbsp;&nbsp;
																					<%
																						Object o = session.getAttribute("user");
																						if(o!=null){
																							if("2".equals(((User)o).getLogin())){
																								out.print("[<a href=\"user.jsp\">用户中心</a>]"); 
																							}else{
																								out.print("[<a href=\"admin.jsp\">用户中心</a>]");
																							}
																						}else{
																							out.print("[<a href=\"login.jsp\">用户中心</a>]");
																						}
																					%>
																					&nbsp;&nbsp;
																					[<a href="release.jsp">免费发布信息</a>]
																					&nbsp;&nbsp;
																					<%
																						//Object o = session.getAttribute("user");
																						if(o!=null){
																							out.print("欢迎<span style=\"font-family: Arial,Tahoma,'宋体';font-weight:600;color:#FF0000;\">"+((User)o).getUsername()+"</span>登录");
																						}else{
																							out.print("[<a href=\"login.jsp\">登录</a>]");
																						}
																					%>
																					&nbsp;&nbsp;
																					[<a href="login.jsp">切换用户</a>]
																					&nbsp;&nbsp;
																					[<a href="register.jsp">注册新用户</a>]
																						<input type="hidden" id="submit_buyType" value="all">
																						<input type="hidden" id="submit_schoolId" value="0">
																						<input type="hidden" id="submit_goodsType" value="all">
																						<input type="hidden" id="submit_PriceFrom" value="0">
																						<input type="hidden" id="submit_PriceTo" value="0">
																						
																						<input type="hidden" id="picture_or_word" value="word">
																						<input type="hidden" id="online_or_all" value="0">
																						<input type="hidden" id="sort_type" value="mo_ren">
																						<input type="hidden" id="query_by_time" value="0">
																						
																						<input type="hidden" id="query_string_detail" value="">
																					</caption>
																					<tr>
																						<th>
																							查询详细信息
																						</th>
																						<td>
																							<a id="buyType_all"  onclick="getDataByBuyType('all','buyType_all','buyType_sale','buyType_buy');" 
																								style="color: black;text-decoration: none;cursor: auto;font-weight: bold;">全部</a>&nbsp;
																							<a id="buyType_sale" onclick="getDataByBuyType('转让','buyType_sale','buyType_buy','buyType_all');" 
																								style="color: blue;text-decoration: underline;cursor: pointer;">只看出租或出售</a>
																							&nbsp;
																							<a id="buyType_buy" onclick="getDataByBuyType('求购','buyType_buy','buyType_all','buyType_sale');" 
																								style="color: blue;text-decoration: underline;cursor: pointer;">只看求租或求购</a>
																						</td>
																					</tr>
																					<tr>
																						<th>
																							当前城市的大学：
																						</th>
																						<td id="city_all_school">
																						</td>
																					</tr>
																					<tr>
																						<th>
																							物品详细分类：
																						</th>
																						<td>
																							<a id="goods_type0" onclick="getDataByGoodsType('all',0)"
																								style="color: black;text-decoration: none;cursor: auto;font-weight: bold;">全部</a>&nbsp;
																							<a id="goods_type1" onclick="getDataByGoodsType('二手电脑',1)"
																								style="color: blue;text-decoration: underline;cursor: pointer;">二手电脑 </a>&nbsp;
																							<a id="goods_type2" onclick="getDataByGoodsType('二手手机',2)"
																								style="color: blue;text-decoration: underline;cursor: pointer;">二手手机</a>&nbsp;
																							<a id="goods_type3" onclick="getDataByGoodsType('数码产品',3)"
																								style="color: blue;text-decoration: underline;cursor: pointer;">数码产品</a>&nbsp;
																							<a id="goods_type4" onclick="getDataByGoodsType('生活用品',4)"
																								style="color: blue;text-decoration: underline;cursor: pointer;">生活用品</a>&nbsp;
																							<a id="goods_type5" onclick="getDataByGoodsType('小家电',5)"
																								style="color: blue;text-decoration: underline;cursor: pointer;">小家电</a>&nbsp;
																							<a id="goods_type6" onclick="getDataByGoodsType('文体用品',6)"
																								style="color: blue;text-decoration: underline;cursor: pointer;">文体用品</a>&nbsp;
																							<a id="goods_type7" onclick="getDataByGoodsType('文具图书',7)"
																								style="color: blue;text-decoration: underline;cursor: pointer;">文具图书</a>&nbsp;
																							<a id="goods_type8" onclick="getDataByGoodsType('其他',8)"
																								style="color: blue;text-decoration: underline;cursor: pointer;">其他</a>
																							 
																						</td>
																					</tr>
																					<tr>
																						<th>
																							价格：
																						</th>
																						<td style="padding-top: 3px;padding-bottom: 3px;">
																							<a id="sub_price0" onclick="getDataByPrice(0,0,0);" 
																								style="color: black;text-decoration: none;cursor: auto;font-weight: bold;">全部</a>&nbsp;
																							<a id="sub_price1" onclick="getDataByPrice(0,20,1);" 
																								style="color: blue;text-decoration: underline;cursor: pointer;">20元以下</a>&nbsp;
																							<a id="sub_price2" onclick="getDataByPrice(20,50,2);"
																								style="color: blue;text-decoration: underline;cursor: pointer;">20-50元</a>&nbsp;
																							<a id="sub_price3" onclick="getDataByPrice(50,100,3);"
																								style="color: blue;text-decoration: underline;cursor: pointer;">50-100元</a>&nbsp;
																							<a id="sub_price4" onclick="getDataByPrice(100,150,4);"
																								style="color: blue;text-decoration: underline;cursor: pointer;">100-150元</a>&nbsp;
																							<a id="sub_price5" onclick="getDataByPrice(150,200,5);"
																								style="color: blue;text-decoration: underline;cursor: pointer;">150-200元</a>&nbsp;
																							<a id="sub_price6" onclick="getDataByPrice(200,300,6);"
																								style="color: blue;text-decoration: underline;cursor: pointer;">200-300元</a>&nbsp;
																							<a id="sub_price7" onclick="getDataByPrice(300,500,7);"
																								style="color: blue;text-decoration: underline;cursor: pointer;">300-500元</a>&nbsp;
																							<a id="sub_price8" onclick="getDataByPrice(500,1000,8);"
																								style="color: blue;text-decoration: underline;cursor: pointer;">500-1000元</a>&nbsp;
																							<a id="sub_price9" onclick="getDataByPrice(1000,0,9);"
																							style="color: blue;text-decoration: underline;cursor: pointer;">1000元以上</a>
																							<br>
																							<input type="text" class="aztxt" id="price_input_from"
																								name="txt" value="" size="10" maxlength="10" />
																							元到
																							<input type="text" class="aztxt" id="price_input_to"
																								name="txt2" value="" size="10" maxlength="10" />
																							元<input type="button" id="pbn"
																								value="价格筛选" name="pbn"
																								onclick="choosePrice();" />
																						</td>
																					</tr>
																					<tr>
																						<th>
																							关键字搜索
																						</th>
																						<td>
																							<input type="text" class="aztxt" id="keyworks_input"
																								name="txt3" value="" size="15" maxlength="10" />
																							<input type="button" class="azpbn" id="pbn"
																								value="搜索" name="pbn"
																								onclick="getDataBySearchDetail();" />
																						</td>
																					</tr>
																				</table>
																			</td>
																		</tr>
																		<tr>
																			<td class="aznoneSheet">
																				<table class="aztabSheetArea" id="ragSUBMIT1"
																					name="ragSUBMIT1" cellpadding="0" cellspacing="0"
																					style="display: inline-table;">
																					<tr>
																						<td class="aztabBtnArea">
																							<div align="left" class="aztabBtnArea">
																								<input type="button" class="aztabBtnSelect"
																									style="width: 30%" id="lbvTab11"
																									name="lbvTab11" value="校园二手信息" />
																							</div>
																						</td>
																					</tr>
																					<tr>
																						<td class="aztabSheet">
																							<table class="azblt" cellpadding="0"
																								cellspacing="0">
																								<tr>
																									<td valign="top" style="height: 1px">
																										<p>
																											
																											<input type="button" class="azpbn" id="photo_input"
																												value="切换到图文" name="pbn"
																												onclick="eventPhotoOrWords();" />
																											
																											<select class="azcbx" id="sort_select" name="cbx">
																												<option value="0">请选择排序方式</option>
																												<option value="1">按发布时间排序</option>
																												<option value="2">按更新时间排序</option>
																											</select>
																											<select class="azcbx" id="query_time_select"
																												name="select">
																												<option value="0">发布时间</option>
																												<option value="3">三天内</option>
																												<option value="7">一周内</option>
																												<option value="30">一月内</option>
																												<option value="-1">全部时间</option>
																											</select>
																											
																										</p>
																										<table class="azgrid" cellspacing="0"
																											cellpadding="0" id="table_info">
																											<caption >
																												&nbsp;&nbsp;&nbsp;&nbsp;
																												<span id="total_info"></span>
																											</caption>
																											<!-- 这里存放物品的详细信息
																											<tr>
																												<th>
																													一小时前
																												</th>
																												<td>
																													某地某人要卖车子
																												</td>
																											</tr> -->
																											<tbody id="table_body_info">
																											</tbody>
																											
																										</table>
																										<p>
																											&nbsp;
																										</p>
																									</td>
																								</tr>
																								<tr>
																									<td valign="top"></td>
																								</tr>
																							</table>
																						</td>
																					</tr>
																				</table>
																			</td>
																		</tr>
																	</table>
																</td>
															</tr>
														</table>
													</td>
												</tr>
												<tr>
													<td valign="top"></td>
												</tr>
											</table>
										</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>

	</body>
</html>
